/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame.game.monsters;

import cardgame.game.*;
import cardgame.game.events.*;

/**
 *
 * @author Carl
 */
public class InjuredBlademaster extends MonsterCard{

    public InjuredBlademaster(){
        description = new Description("Injured Blademaster", "When this monster is summoned, deal 4 damage to it.");
        manaTypes = new Mana[]{Mana.CUSTOM};
        summonCost = new Cost(new ManaAmount(Mana.CUSTOM, 3), 0, false);
        attackDamage = 4;
        setLifepoints(7);
    }

    @Override
    public void postEvent(Game game, Event receivedEvent){
        super.postEvent(game, receivedEvent);
        if(receivedEvent instanceof SummonMonsterEvent){
            SummonMonsterEvent event = (SummonMonsterEvent) receivedEvent;
            if(event.getMonsterCard() == this){
                game.triggerEvent(new AddMonsterCurrentLifepointsEvent(this, -4));
            }
        }
    }
}
